package com.admin.dao

import com.data.annotation.NoargAnnotation
import com.data.annotation.OpenAnnotation
import com.data.bean.IndexAdmin
import com.data.entity.IndexAdminState
import org.apache.ibatis.annotations.Param
import org.springframework.stereotype.Repository

@Repository
@OpenAnnotation
@NoargAnnotation
interface AdminIndexDao {
    /**
     * 查询首页展示图的全部内容
     *
     * @return
     */
    fun indexBannerListDao(): List<IndexAdmin>

    /**
     * 删除首页展示图
     *
     * @param id
     * @return
     */
    fun deleteBannerListDao(@Param("id") id: String): Int

    /**
     * 根据id 查询banner图
     *
     * @param id
     * @return
     */
    fun findbyidBannerListDao(@Param("id") id: String): IndexAdmin?

    /**
     * 修改展示的状态
     * @param indexAdminState
     * @return
     */
    fun changeStateDao(@Param("indexAdminState") indexAdminState: IndexAdminState): Int

    /**
     * 添加banner图
     */
    fun saveMassageDao(@Param("indexAdmin") indexAdmin: IndexAdmin): Int
}
